package cn.org.mrliu.code.generator.bean;

import cn.org.mrliu.code.generator.util.DataTypeUtil;

public class DataType {
	private String name;
	private String jdbcTypeName;
	private String javaTypeName;
	public DataType() {
		super();
	}
	public DataType(String name) {
		this.name = name;
		this.jdbcTypeName = DataTypeUtil.getJdbcTypeName(name);
		this.javaTypeName = DataTypeUtil.getJavaTypeName(name);
	}
	public String getJdbcTypeName() {
		return jdbcTypeName;
	}
	public void setJdbcTypeName(String jdbcTypeName) {
		this.jdbcTypeName = jdbcTypeName;
	}
	public String getJavaTypeName() {
		return javaTypeName;
	}
	public void setJavaTypeName(String javaTypeName) {
		this.javaTypeName = javaTypeName;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Override
	public String toString() {
		return "DataType [name=" + name + ", jdbcTypeName=" + jdbcTypeName + ", javaTypeName=" + javaTypeName + "]";
	}
}
